﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TrainningWeekend
{
    class Student : IComparable
    {
        public int age;
        public string name;

        public Student()
        {
        }

        public Student(int age, string name)
        {
            this.age = age;
            this.name = name;
        }

        public int CompareTo(object obj)
        {
            Student s = (Student)obj;
            return -age.CompareTo(s.age);
        }

        public override string ToString()
        {
            return "Name:" + name + ",Age:" + age;
        }

    }
}
